# 返回结果bytes转成String
def response_bytes_to_string(input: bytes):
    if input is None:
        return ""
    return input.decode('utf-8').strip('\r\n')


# 请求的命令转为bytes，并在末尾加上\r\n
def request_string_to_bytes(input: str):
    byt = input.encode('utf-8')
    byt += b'\r\n'
    return byt
